ArcFM Responder Mobile Developer Guide
ToStruct<T>(Byte[],Int32) Method






The struct type to convert to.
An array of bytes.
The starting position within the buffer.
Returns a struct converted from the byte array.
Syntax
'Declaration
 
Public Overloads Shared Function ToStruct(Of T As {New, Struct})( _
   ByVal buffer() As System.Byte, _
   ByVal startIndex As System.Integer _
) As T
'Usage
 
Dim buffer() As System.Byte
Dim startIndex As System.Integer
Dim value As T
 
value = StructConverter.ToStruct(Of T)(buffer, startIndex)
public static T ToStruct<T>( 
   System.byte[] buffer,
   System.int startIndex
)
where T: new(), struct
public function ToStruct( 
    buffer: System.Bytearray of;
    startIndex: System.Integer
): T; static; 
public static function ToStruct( 
   buffer : System.byte[],
   startIndex : System.int
) : T;
public: static T* ToStruct<T>( 
   System.byte[]* buffer,
   System.int startIndex
) 
where T: gcnew(), value class
public:
static T^ ToStructgeneric<typename T>
( 
   System.array<byte>^ buffer,
   System.int startIndex
) 
where T: gcnew(), value class

Parameters

buffer
An array of bytes.
startIndex
The starting position within the buffer.

Type Parameters

T
The struct type to convert to.

Return Value

A struct represented by the contents of the byte array.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

StructConverter Class
StructConverter Members
Overload List

Send Feedback